package com.wujing.abstractdemo

/**
 * scala 重写
 */
object ScalaFiledOverride {

  def main(args: Array[String]): Unit = {
    val obj1:BB = new BB
    val obj2:AA = new BB

    println("obj1.name=="+obj1.name)
    println("obj2.name=="+obj2.name)
  }
}

class AA{
  val name: String = "tom"
}
class BB extends AA {
  override val name: String = "xiao"
}
